package com.itheima.el;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@WebServlet("/demo5")
public class ServletDemo5 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setAttribute("age",23);
        req.setAttribute("gender","man");
        List list = new ArrayList();
        req.setAttribute("List",list);
        String s = "";
        req.setAttribute("String",s);
        req.getRequestDispatcher("/el5.jsp").forward(req,resp);


    }
}
